#include "Object.h"


Object::Object()
{
 
}

Object::Object(float x, float y)
{
	pos_x = x;
	pos_y = y;

	isChangeState = false;
	isActiveMushRoom = false;
	direction = 0;
	numCoinZero = false;
	container = NULL;
}
 
Object::Object(float x, float y, int obj_id, int obj_state)
{
	this->pos_x = x;
	this->pos_y = y;
	this->id_obj = obj_id;
	this->obj_state = obj_state;

	isChangeState = false;
	isActiveMushRoom = false;
	direction = 0;
	numCoinZero = false;
	container = NULL;
}

Object::~Object()
{
	delete p_sprite;
	//delete box_obj;
}

//void Object::update(float gameTime)
//{
//	 
//}
 
void Object::render(int cameraX, int cameraY)
{
	p_sprite->render(pos_x, pos_y, cameraX, cameraY);
 }


Box Object::getBox(float delta_time)
{
	/*Box box_obj(pos_x - p_sprite->getTexture()->getWidth()/2,
	pos_y + p_sprite->getTexture()->getHeight()/2, 
	p_sprite->getTexture()->getWidth(),
	p_sprite->getTexture()->getHeight(),
	veloc_x * delta_time,
	veloc_y * delta_time);*/
	Box box_obj(pos_x - width / 2,
				pos_y + height / 2, 
				width,
				height,
				veloc_x * delta_time,
				veloc_y * delta_time);
	return box_obj;
}

OBJECT_TYPE Object::getObjectType()
{
	return OBJECT_SCENE;
}

void Object::update(list<Object*>* obj_list, DxInput* input, float TPF)
{

}